// pages/index/confirmationOfOrder/confirmationOfOrder.js
Page({

  /**
   * Page initial data
   */
  data: {
    popview_hinden  : true,
    coupon_popview_hinden:true,
    pop_select:1,
    goodsList: [
      { "name": "贝智康花冠高阶3段配方乳粉900g...", stock: "12", id: 1 },
      { "name": "贝智康畅益组合3段配方乳粉900g...", stock: "12", id: 2 },
      // { "name": "贝智康 花冠高阶 3段配方乳粉400g", stock: "12", id: 3 }
    ],
    shopList: [
      { "name": "贝智康花冠高阶3段配方乳粉900g...", stock: "12", id: 1 },
      { "name": "贝智康畅益组合3段配方乳粉900g...", stock: "12", id: 2 },
      // { "name": "贝智康 花冠高阶 3段配方乳粉400g", stock: "12", id: 3 }
    ],
  },

  /**
   * Lifecycle function--Called when page load
   */
  onLoad: function (options) {

  },

  /**
   * Lifecycle function--Called when page is initially rendered
   */
  onReady: function () {

  },

  /**
   * Lifecycle function--Called when page show
   */
  onShow: function () {

  },

  /**
   * Lifecycle function--Called when page hide
   */
  onHide: function () {

  },

  /**
   * Lifecycle function--Called when page unload
   */
  onUnload: function () {

  },

  /**
   * Page event handler function--Called when user drop down
   */
  onPullDownRefresh: function () {

  },

  /**
   * Called when page reach bottom
   */
  onReachBottom: function () {

  },

  /**
   * Called when user click on the top right corner to share
   */
  onShareAppMessage: function () {

  },
  confirmbtnClick: function(event){
    this.setData({
      popview_hinden: false
    })
  },
  couponshow_Click: function(event){
    this.setData({
      coupon_popview_hinden: false
    })
  },
  closePopview: function(event){
    this.setData({
      popview_hinden: true,
      coupon_popview_hinden:true
    })
  },
  selectBtnClick: function(event){
    this.setData({
      pop_select: event.currentTarget.dataset.id
    })
  },
  orderShopSure:function(){
    this.setData({
      popview_hinden: true,
      coupon_popview_hinden: true
    });
    // 单独购买支付成功
    wx.navigateTo({
      url: '/pages/index/paySuccess',
    })
    // 拼团购买-拼团详情
    // wx.navigateTo({
    //   url: '/pages/mine/assemble/assembleDetail',
    // })
  },
})
